<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>多分支if else语句</title>
</head>
<body>
    <script>
        /*输入一个百分制分数，输出对应五分制分数
            90~100--A;80~90--B;70~80--C;60~70--D;<60--E*/
        //1.输入对话框，输入分数
        var score=Number(prompt('请输入分数'));
        //2.分多种情况输出五分制分数
        if(score>=90){
            alert('A');
        }else if(score>=80){
            alert('B');
        }else if(score>=70){
            alert('C');
        }else if(score>=60){
            alert('D');
        }else{
            alert('E');
        }
    </script>
</body>
</html>